package com.bkfm.framework.sys.rest;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.yak.core.web.BaseRest;
import org.yak.core.web.Result;
import org.yak.core.web.Result.Status;

import com.bkfm.framework.sys.api.service.IBkfmMenuService;
import com.bkfm.framework.sys.entity.BkfmMenu;
import com.bkfm.framework.sys.entity.BkfmUsers;

/**
 * 系统设置
 * @author Administrator
 *
 */
@RestController
@RequestMapping("/v1/setting/**")
public class BkfmSettingRest extends BaseRest<BkfmUsers>{

	@Resource
	private IBkfmMenuService bkfmMenuService;
	
	/**
	 * 添加用户桌面快捷菜单
	 * @return
	 */
	@RequestMapping("/adduserdesktopmenu")
	public Result addUserDesktopMenu(BkfmMenu menu) {
		try {
			bkfmMenuService.addUserDesktopMenu(menu);
			return new Result(Status.OK,"success");
		}catch(Exception e) {
			logger.error("添加桌面快捷菜单异常",e);
			return new Result(Status.ERROR,e.getMessage());
		}
	}
}
